﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Diploma.Models.CollaborationRoom>" %>
<%@ Import Namespace="ViewRes" %>
<span>
<span style="display: block; height: 50px; margin: 0 10px 0 0; overflow: hidden; position: absolute; width: 50px; z-index: 10;">
    <%
        if (Model.Student == null)
        {%>  
        <img src="<%:Url.Content("~/Content/Icons/pending.png")%>" width='48px' height='48px' alt=' <%:CollaborationRooms.NoOneTook%>' />   
    <%
        } %>
    <%
        else
        {%>
      <%
            if (Model.IsCompleted)
            {%>
      <img src="<%:Url.Content("~/Content/Icons/job-done.png")%>" width='48px' height='48px' alt='<%:CollaborationRooms.Completed%>' /> 
      <%
            } %>
      <%
            else
            {%>
            <img src="<%:Url.Content("~/Content/Icons/started.png")%>" width='48px' height='48px' alt='<%:CollaborationRooms.InProcess%>' />
        <%
            }%>
    <%
        }%>
  </span> 
  <span style="display: block; margin-left: 57px;">
    <div class="smalltitle">                  
        <%
        if (Model.AllowAccess((User) ViewData["LoggedUser"]) && Model.Student != null)
        {%> 
            <%:Html.RouteLink(Model.BaseTheme.Trim(), "Default",
                                             new
                                                 {
                                                     controller = "CollaborationRooms",
                                                     action = "Enter",
                                                     id = Model.CollaborationRoomId
                                                 })%>
        <%
        } %>
        <%
        else
        {%>  
            <%:Model.BaseTheme.Trim()%>
        <%
        }%>
     </div>
     <span>
        <%:Html.Encode(Model.BaseDescription)%>
     </span>
    </span>
  </span>
